<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/10/27
  Time: 10:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    Cookie[] cookies=request.getCookies();
    if(cookies!=null && cookies.length>0){
        for (Cookie cookie:cookies) {
            if(cookie.getName().equals("userName")){
                out.print("用户名为："+cookie.getValue());
            }
            if(cookie.getName().equals("pwd")){
                out.print("密码为："+cookie.getValue());
            }
        }
    }
%>

</body>
</html>
